﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

using ERPStore.Tests;
using ERPStore.Extensions;

using NUnit.Framework;

using Microsoft.Practices.Unity;

namespace ERPStore.Coupons.Tests.Services
{
	[TestFixture]
	public class IncentiveServiceTests : TestBase
	{
		public IncentiveServiceTests()
		{

		}

		[SetUp]
		public void Setup()
		{
			base.Initialize();

			var container = GlobalConfiguration.Configuration.DependencyResolver.GetContainer();
			IncentiveService = container.Resolve<ERPStore.Services.IIncentiveService>();
			AdminIncentiveService = container.Resolve<ERPStore.Coupons.Services.AdminIncentiveService>();
		}

		protected ERPStore.Services.IIncentiveService IncentiveService { get; private set; }
		protected ERPStore.Coupons.Services.AdminIncentiveService AdminIncentiveService { get; private set; }

		[Test]
		public void Validate_Use_NullCart()
		{
			var incentiveService = GlobalConfiguration.Configuration.DependencyResolver.GetService<ERPStore.Services.IIncentiveService>();
			var result = incentiveService.ValidateUse(null, null, null);

			Assert.IsNull(result);
		}

	}
}
